<!DOCTYPE html>
<html lang="">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <meta name="baidu-site-verification" content="codeva-Wi8fkRdcR2" />
    <link rel="icon" href="<%= BASE_URL %>favicon.ico">
    <title><%= htmlWebpackPlugin.options.title %></title>
  </head>
  <body>
    <noscript>
      <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
    </noscript>
    <div id="app"></div>
    <!-- built files will be auto injected -->
  </body>
  
  <script src="https://api.suyanw.cn/api/mouse/yinghua.js"></script>
  <script>
    // 原生js获取路由地址
    function updateTitle() {
        const url = window.location.href;
        if (url.includes('/admin')) {
          // 设置网站的title
          document.title = '后台管理系统';
        } else {
          document.title = '旅游自助平台';
        }
      }

      // 页面加载时更新标题
      window.addEventListener('load', updateTitle);

      // 监听popstate事件更新标题
      window.addEventListener('popstate', updateTitle);
  </script>
</html>
